# 定义顺序查找
def sequence_search(sequence, target):
    for i in range(len(sequence)):
        if target == sequence[i]:
            return "查找成功, 元素{}下标为{}".format(target, i)
    return "查找失败, {}不存在".format(target)


data_list = [1, 2, 3, 6, 7, 8, 5, 4, 9]
print(sequence_search(data_list, 9))
print(sequence_search(data_list, 10))

